package events;

import train.Train;

/**
 * Train_Arrival is a class that inheirts the event class. This allows for
 * further definition of the unique objects that occur only within the Arrival.
 * 
 * @author Team Switchboard Boxcar
 * 
 */

public class Train_Arrival extends Event {

	private Train Train;

	private int DestinationNeighborhood;

	/**
	 * The Train_Arrival constructor builds the Train_Arrival {@link Event}.
	 * This constructor must take in the {@link Train}, the destination and the
	 * time this event occurs.
	 * 
	 * @param MyTrain
	 *            The {@link Train} that is scheduled to arrive during this
	 *            event.
	 * @param MyDestination
	 *            The Neighborhood index at which the train will arrive.
	 * @param MyTime
	 *            The time the Train is scheduled to arrive. This is a number
	 *            representing the minutes since the beginning of the
	 *            simulation.
	 */
	public Train_Arrival(Train MyTrain, int MyDestination, int MyTime) 
	{
		super(5, MyTime);
		Train = MyTrain;
		DestinationNeighborhood = MyDestination;
	}

	/**
	 * GetTrain is a function that can be called to get the train that is being
	 * processed within this event.
	 * 
	 * @return Returns the Train that is arriving during this event.
	 */
	public Train GetTrain() 
	{	return Train;	}

	/**
	 * GetDestination is a function that can be called to get the neighborhood
	 * index of the train arrival.
	 * 
	 * @return Returns the destination neighborhood index (0-3) for the Train.
	 */
	public int GetDestination() 
	{	return DestinationNeighborhood;	}
}